<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <script type="text/javascript">
			$(function(){
        		$(".my97-date").click(function(){
        			WdatePicker();
        		});
        		$(".my97-datetime").click(function(){
        			WdatePicker({dateFmt:"yyyy-MM-dd HH:mm:ss"});
        		});
        	});
		</script>
    </head>
    <body>
       <!--手术信息-->
			<script type="text/javascript">
	        	//var mrDataset = window.dataset;
	    			    			    		
	        	$(function(){
	        		SurgeryPanel.init();
	        	});
	        </script>
	        
			<div id="surgeryPanel"  border="true" style="border-style: none solid solid solid;border-color: #99BBE8;border-width: 1px">
				<div id="surgerys" class="easyui-tabs" border="false">
					<div title="手术信息-1" closable="true"></div>
				</div>
				<form id="surgery">
				<fieldset>
					<legend>
						手术情况
					</legend>
					<table class="layout-table">
						<colgroup>
							<col width="20%"/>
							<col width="30%"/>
							<col width="20%"/>
							<col width="30%"/>
						</colgroup>
						<tbody>
							<tr>
								<td align="right"><label for="ACA01">手术日期时间（开始）：</label></td>
								<td>
								<input id="ACA01" name="ACA01" type="text" class="easyui-validatebox my97-datetime" required="true"/>
								</td>
								<td align="right"><label for="ACA11">手术日期时间（完成）：</label></td>
								<td>
								<input id="ACA11" name="ACA11" type="text" class="easyui-validatebox my97-datetime" required="true"/>
								</td>
							</tr>
							<tr>
								<td align="right"><label for="ACA02">术者（手术操作医师姓名）：</label></td>
								<td>
								<input id="ACA02" name="ACA02" type="text" class="easyui-validatebox" required="true" validType="length[1,20]"/>
								</td>
								<td align="right"><label for="ACA03">Ⅰ助姓名：</label></td>
								<td>
								<input id="ACA03" name="ACA03" type="text" class="easyui-validatebox" validType="length[0,20]"/>
								</td>
							</tr>
							<tr>
								<td align="right"><label for="ACA04">Ⅱ助姓名：</label></td>
								<td>
								<input id="ACA04" name="ACA04" type="text" class="easyui-validatebox" validType="length[0,20]"/>
								</td>
								<td align="right"><label for="ACA06C">麻醉方式代码：</label></td>
								<td>
								<input id="ACA06C" name="ACA06C" type="text" class="easyui-combobox" url="medicalrecord/data/dic-MaZuiFangShi.json" validType="comboboxfixed['ACA06C']"/>
								</td>
							</tr>
							<tr>
								<td align="right"><label for="ACA07C">切口愈合等级代码：</label></td>
								<td>
								<input id="ACA07C" name="ACA07C" type="text" class="easyui-combobox" url="medicalrecord/data/dic-QieKouYuHe.json" validType="comboboxfixed['ACA07C']"/>
								</td>
								<td align="right"><label for="ACA08">麻醉医师姓名：</label></td>
								<td>
								<input id="ACA08" name="ACA08" type="text" class="easyui-validatebox" validType="length[0,20]"/>
								</td>
							</tr>
							<tr>
								<td align="right"><label for="ACA10C">手术级别代码：</label></td>
								<td>
								<input id="ACA10C" name="ACA10C" type="text"  class="easyui-combobox" url="medicalrecord/data/dic-SurgeryLevel.json" panelHeight="auto" required="true" validType="comboboxfixed['ACA10C']"/>
								</td>
								<td></td><td></td>
							</tr>
						</tbody>
					</table>
				</fieldset>
				</form>
				<fieldset>
					<legend>
						术式信息
					</legend>
				<script type="text/javascript">
						$(function() {
							$('#ACA09S').initGrid();
						});
						function ACA0901C_resultHandler(event, item){
							item = item||{};
							var target = event.currentTarget;
							var el = $(target).parent().parent().parent().parent().parent().parent().next().find("input");
							el.val(item.name);
							el.validatebox("validate");
						}
						function ACA0901N_resultHandler(event, item){
							item = item||{};
							var target = event.currentTarget;
							var el = $(target).parent().parent().parent().parent().parent().parent().prev().find("input");
							el.val(item.code);
							el.validatebox("validate");
						}
						function bool_Formatter(value){
							for(var i=0; i<dic_bool.length; i++){
								if (dic_bool[i].value == value) return dic_bool[i].text;
							}
							return value;
						}

					</script>
					<table id="ACA09S" style="height:350px" title="术式信息" singleSelect="true" rownumbers="true">
						<thead>
							<tr>
								<th field="ACA0901C" width="200" align="center" editor="{type:'autocompletebox',options:{source:czData,autoFill : false,matchContains: true,formatItem: function(item){return item.code+'('+item.name+')';},formatResult:function(item,i,max){return item.code;},formatMatch:function(row,i,max){return row.code+row.name+row.pym},resultHandler:ACA0901C_resultHandler,required:true,validType:'fixedin[czData,\'code\']'}}"> 手术及操作编码 </th>
								<th field="ACA0901N" width="400" align="center" editor="{type:'autocompletebox',options:{source:czData,autoFill : false,matchContains: true,formatItem: function(item){return item.name+'('+item.code+')';},formatResult:function(item,i,max){return item.name;},formatMatch:function(row,i,max){return row.code+row.name+row.pym},resultHandler:ACA0901N_resultHandler,required:true,validType:'fixedin[czData,\'name\']'}}"> 手术及操作名称 </th>
								<th field="ACA0902C" width="100" align="center" formatter="bool_Formatter" editor="{type:'combobox',options:{required:true,data:dic_bool,panelHeight:'auto',editable:false}}"> 是否主要术式 </th>
								<th field="ACA0903C" width="130" align="center" formatter="bool_Formatter" editor="{type:'combobox',options:{required:true,data:dic_bool,panelHeight:'auto',editable:false}}"> 是否主要手术或操作 </th>
							</tr>
						</thead>
					</table>		
			</fieldset>
			</div>
    </body>
</html>
